// Kony


#include "AbilitySystem/Data/AbilityInfo.h"
#include "GASC_HuanLing/BaseLogChannels.h"

FBaseAbilityInfo UAbilityInfo::FindAbilityInfoForTag(const FGameplayTag& AbilityTag, bool bLogNotFound) const
{
	for (const FBaseAbilityInfo& Info : AbilityInformation)
	{
		//循环找到Tag对应的属性
		if (Info.AbilityTag == AbilityTag)
		{
			return Info;
		}
	}
	if (bLogNotFound)
	{
		//如果为空打印日志
		UE_LOG(LogHuanYue, Error, TEXT("Could not find Info for AbilityTag [%s] on  AbilityInfo for Tag %s")
			,*AbilityTag.ToString(), *GetNameSafe(this));
	}
	//如果没找到信息则返回空的结构体
	return FBaseAbilityInfo();
}
